//
//  JZSpotlightTool.h
//  JFTwxsd
//
//  Created by Peter on 2018/5/28.
//  Copyright © 2018年 junfeiweiyejiaoyujituan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreSpotlight/CoreSpotlight.h>
#import <MobileCoreServices/MobileCoreServices.h>

@class JZSpotlightTool;


typedef JZSpotlightTool * (^SpotlightText)(NSArray *titleArr);
typedef JZSpotlightTool * (^SpotlightImage)(NSArray<NSString *> *imageDataArr);
typedef JZSpotlightTool * (^SpotlightKeywords)(NSArray<NSArray *> *keywordsArr);

typedef void (^callback)(NSDictionary *identifier);
typedef JZSpotlightTool * (^SpotlightClosure)(callback callback);

@interface JZSpotlightTool : NSObject

@property (copy, nonatomic) SpotlightText title;
@property (copy, nonatomic) SpotlightText descp;
@property (copy, nonatomic) SpotlightImage image;
@property (copy, nonatomic) SpotlightKeywords keywords;
@property (copy, nonatomic) SpotlightText userInfo;
@property (copy, nonatomic) SpotlightClosure userActivity;

- (void)makeSpotlight;
- (void)deleteAllSpotlight;

@end

#pragma mark - 单例相关
@interface JZSpotlightTool (Once)
+ (nonnull instancetype)shared;
@end
